---
id: 660f51f1df0a8757934a5796
title: Step 105
challengeType: 1
dashedName: step-105
---

# --description--

Now move your `.unshift()` call into your `if` block.

# --hints--

Your `.unshift()` call should be in your `if` block.

```js
assert.match(code, /if\s*\(\s*inverted\s*\)\s*\{\s*rows\.unshift\(\s*padRow\(\s*i\s*,\s*count\s*\)\s*\);\s*\}/);
```

# --seed--

## --seed-contents--

```js
const character = "#";
const count = 8;
const rows = [];
let inverted = true;

function padRow(rowNumber, rowCount) {
  return " ".repeat(rowCount - rowNumber) + character.repeat(2 * rowNumber - 1) + " ".repeat(rowCount - rowNumber);
}

// TODO: use a different type of loop
--fcc-editable-region--
for (let i = 1; i <= count; i++) {
  if (inverted) {

  }
  rows.unshift(padRow(i, count));
}
--fcc-editable-region--

/*while (rows.length < count) {
  rows.push(padRow(rows.length + 1, count));
}*/

/*for (let i = count; i > 0; i--) {
  rows.push(padRow(i, count));
}*/

let result = ""

for (const row of rows) {
  result = result + "\n" + row;
}

console.log(result);
```
